# 启动 停止 jar 的脚本
#!/bin/bash
processName='java'
pids=`ps -ef |grep ${processName} |grep -v grep|grep java |awk -F" " '{print $2}'`
if [ -z "${pids}" ]; then
    echo "no process is running : " ${processName}
else
    echo ${processName}" is running pids is : "${pids}
     for pid in $pids;do
        echo "--- kill -9 " $pid
     done
fi

